import numpy as np

Indenters = {
    "flat":[
        "square",
        "triangle",
        "parallelogram",
        "hexagon",
        "circle",
        "ellipse",
        "star",
        "polygon",
        "spline"
    ],
    "nonflat":[
        "strip1",
        "strip2",
        "strip3",
        "tripyramid",
        "rectpyramid",
        "pentpyramid",
        "hexpyramid",
        "freeform1",
        "freeform2"
    ],
    "combination":[
        "two1",
        "two2",
        "two3",
        "ring1",
        "ring2",
        "ring3",
        "three1",
        "three2",
        "three3",
    ],
    "array":[
        "linear1",
        "linear2",
        "linear3",
        "linear4",
        "circular1",
        "circular2",
        "texture1",
        "texture2",
        "texture3"
    ],
    "big":[
        "cylinder1",
        "cylinder2",
        "ellipsoid",
        "spheretext",
    ],
    "big_flat":[
        "l_circle",
        "l_square",
        "l_hexagon",
        "l_pentagon"
    ]
}

def get_indenters(type: str):
    indenters = Indenters[type]
    if len(indenters) == 9:
        # unit: mm
        interval = 35
        indenter_bias = np.array([
            [1, -1],  #x,y
            [0, -1],
            [-1, -1],
            [1, 0],
            [0, 0],
            [-1, 0],
            [1, 1],
            [0, 1],
            [-1, 1],
        ]) * interval
        return indenters, indenter_bias
    elif len(indenters) == 4:
        # unit: mm
        interval = 30
        indenter_bias = np.array([
            [1, -1],  #x,y
            [-1, -1],
            [1, 1],
            [-1, 1],
        ]) * interval
        return indenters, indenter_bias